package com.fzj.charging.common.pojo.day1121;

import java.io.*;
import java.text.SimpleDateFormat;
import java.util.*;

public class UseTest {
    public static void main(String[] args) {
        System.out.println(SingletonEager.getInstance().hashCode());
        System.out.println(SingletonEager.getInstance().hashCode());

        //单精度浮点数（float）使用32位来表示，其中大约23位用于尾数，因此可以表示大约7位有效数字。
        //而双精度浮点数（double）使用64位来表示，其中大约52位用于尾数，因此可以表示大约15到16位有效数字

        //在数学中，有效数字是指在一个数中，从该数的第一个非零数字起，直到到精确到的位数止
        /*double d1 = 0.123456789012345;
        double d2 = 0.1234567890123456;//0.1234567890123456
        double d3 = 0.12345678901234567;//0.12345678901234566 小数点后16位
        double d4 = 0.000000012345678901234567;//1.2345678901234567E-8
        double d5 = 0.0000000123456789012345678;//1.2345678901234567E-8 小数点后16位

        double d6 = 1234567890.1234567890123456;//1.2345678901234567E9 小数点后16位
        double d7 = 999999999.99999999;//1.0E9
        double d8 = 999999999.99999991;//9.999999999999999E8 小数点后15位

        double d9 = 19999999999999965.999999999599999991d;//1.9999999999999964E16 精确小数点后15位

        double d = 99999999999998219999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999d;
        //9.999999999999822E307 //小数点后15位
        float f = 99999999999999997777777777777777777777f;
        long l = 999999999999999999L;
        System.out.println(d1);
        System.out.println(d2);
        System.out.println(d3);
        System.out.println(d4);
        System.out.println(d5);

        System.out.println(d6);
        System.out.println(d7);
        System.out.println(d8);
        System.out.println(d9);
        System.out.println(d);
        System.out.println(f);
        System.out.println(l);

        float x = (float) 1.01d;
        double dNum = 1.01;
        double dNum2 = 3.99;
        System.out.println(dNum+dNum2);*/

        /*ArrayList<String> objects = new ArrayList<>();
        objects.add("aa");
        objects.add(0,"bb");
        objects.add(0,"bb");
        objects.add(0,"cc");
        System.out.println(objects.size());*/

        /*Date date = new Date(1732853304000L);

        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        simpleDateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
        String format = simpleDateFormat.format(date);
        System.out.println(format);
        System.out.println(date);
        Date date1 = new Date(0);
        System.out.println(date1);*/
        /*String[] strArr = new String[3];
        strArr[0] = "zhangsan";
        strArr[1] = "zhangsan2";
        List<String> list = Arrays.asList(strArr);
        System.out.println(list);
        strArr[2] = "3";
        System.out.println(list);*/
        try {
            FileOutputStream fileOutputStream = new FileOutputStream("./file.txt");
            OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fileOutputStream);
            BufferedWriter bufferedWriter = new BufferedWriter(outputStreamWriter);
            PrintWriter printWriter = new PrintWriter(bufferedWriter);
            printWriter.println("meimei");
            printWriter.close();
        }catch(Exception e){
            e.printStackTrace();
        }

    }
}
